--------------------------------------------------
-- Level code
-- Created 22:49 2021-3-12
--------------------------------------------------

-- Run code on level start
function onStart()
    --Your code here
end

-- Run code every frame (~1/65 second)
-- (code will be executed before game logic will be processed)
function onTick()
	for key, value in ipairs(NPC.get(97, -1)) do
		if not value.StoredY then
			value.StoredY = value.y
		end
		value.y = value.StoredY
	end
	if Level.winState() == 6 then
		Level.winState(1)
	end
end

-- Run code when internal event of the SMBX Engine has been triggered
-- eventName - name of triggered event
function onEvent(eventName)
    --Your code here
end

